﻿using System.Web;
using System.Web.Optimization;

namespace Mvc.RazorTools
{
	/// <summary>
	/// The styles bundle used by MVC Razor Tools.
	/// </summary>
	public class StylesBundle : RazorToolsBundle
	{
		internal StylesBundle()
			: base("~/Styles/razortools")
		{
		}

		/// <summary>
		/// Creates a new bundle of the type represented by this instance.
		/// </summary>
		/// <returns>A newly created bundle.</returns>
		protected override Bundle OnGetNewBundle()
		{
			return new StyleBundle(this.Path);
		}

		/// <summary>
		/// Called to render link tags for a set of paths.
		/// </summary>
		/// <returns>An HTML string containing the link tag or tags for the bundle.</returns>
		protected override IHtmlString OnRender()
		{
			return Styles.Render(this.Path);
		}
	}
}